package main

import (
	"net/http"
	"log"
)


//
//	最简单的 webserver
//	编译： 	windows: go build -o simple_server.exe
//			mac 或 linux: go build -o simple_server
//
func main() {
	http.HandleFunc("/", func (resp http.ResponseWriter, req *http.Request) {
		resp.Write([]byte("hello, " + req.FormValue("who")))

	})

	err := http.ListenAndServe("localhost:4000", nil)
	if err != nil {
		log.Fatal(err)
	}
}

